package cn.tedu.store.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.tedu.store.entity.Goods;
import cn.tedu.store.mapper.GoodsMapper;
import cn.tedu.store.service.IGoodsService;
/**
 * 处理商品数据的业务层 实现类
 * @author Administrator
 *
 */
@Service
public class GoodsServiceImpl implements IGoodsService {

	@Autowired
	private GoodsMapper goodsMapper;

	@Override
	public List<Goods> getHotList() {
		return findHotList();
	}

	@Override
	public Goods getById(Long id) {
		return findById(id);
	};	


	/*私有化持久层接口方法*/


	private List<Goods> findHotList(){
		return goodsMapper.findHotList();
	}
	private Goods findById(Long id) {
		return goodsMapper.findById(id);
	}
	
}
